package cn.edu.hbsi.web.controller;

import cn.edu.hbsi.domain.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Getter;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/test")
//@Tag(name = "测试接口")
@Api(tags = "测试接口")
public class TestController
{
    /**
     * “Hello” + 输出传入的信息
     * @return
     */
    @GetMapping("/hello")
//    @Operation(summary = "Hello和输出方法", description = "Hello和输出方法",responses = {
//            @ApiResponse(responseCode = "200", description = "Hello和输出方法"),
//            @ApiResponse(responseCode = "400", description = "参数错误"),
//            @ApiResponse(responseCode = "500", description = "服务器错误")
//    })
    @ApiOperation("Hello和输出方法")
    public Result hello(@RequestParam("t") String t)
    {
        return Result.ok("Hello " + t);
    }
}
